home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / Java / JavaNavigator.exe / %MAINDIR% / stbmenu.js < prev    next >
Encoding:
JavaScript  |  2000-03-06  |  18.8 KB  |  618 lines

  1. // DO NOT CHANGE this file as it will cause the 1st JAVA Navigator to malfunction
  2. //===============================================================================
  3. function getBrowser() 
  4. {
  5.     this.IE4  = (navigator.userAgent.indexOf('MSIE 4') != -1) ? true : false
  6.     this.IE5  = (navigator.userAgent.indexOf('MSIE 5') != -1) ? true : false
  7.     this.IE = (this.IE4||this.IE5)
  8.  
  9.     this.vVersion = parseInt( navigator.appVersion )
  10.     this.NS =  ((navigator.appName=='Netscape') && (this.vVersion>=4))
  11.     this.NS4 = ((navigator.appName=='Netscape') && (this.vVersion==4))
  12.     this.NS5 = ((navigator.appName=='Netscape') && (this.vVersion==5))
  13.     this.NO = ((navigator.appName=='Netscape') && (this.vVersion<4))
  14. }
  15. Browser = new getBrowser()
  16.  
  17. //-------------------------------------------------------------------
  18. function mouseOver(iSel) 
  19. {
  20.  
  21.     iSelOld=this.selectedNode
  22.     if (this.items[iSelOld]!=null) 
  23.     {
  24.         if (this.items[iSelOld].hasImage) this.items[iSelOld].imgObject.document.images[this.name+'IPointer'+iSelOld].src = this.image.PointerN.src
  25.         this.items[iSelOld].treeview.setBGColor(this.color.BackGround)
  26.         this.items[iSelOld].treeview.write(this.items[iSelOld].ForeGround)
  27.         this.items[iSelOld].selected = false
  28.     }
  29.  
  30.     if (this.items[iSel]!=null) 
  31.     {    
  32.         this.selectedNode = iSel
  33.         this.href = this.items[iSel].href
  34.         if (this.items[iSel].hasImage) this.items[iSel].imgObject.document.images[this.name+'IPointer'+iSel].src = this.image.PointerS.src
  35.         this.items[iSel].treeview.setBGColor(this.color.moBackGround)
  36.         this.items[iSel].treeview.write(this.items[iSel].moForeGround)
  37.         this.items[iSel].selected = true
  38.         this.onSelect()
  39.     }
  40.  
  41. }
  42.  
  43. //-------------------------------------------------------------------
  44. function mouseExit(iSel) 
  45. {
  46.     if (!this.items[iSel].selected) this.items[iSel].treeview.setBGColor(this.color.BackGround)
  47. }
  48.  
  49. //-------------------------------------------------------------------
  50. function mouseClick(iSel) 
  51. {
  52.     if (this.href==null) return
  53.     if (top.frames.length == 0) location.href=this.href
  54.     else top.frames[1].location.href = this.href    
  55. }
  56.  
  57. //-------------------------------------------------------------------
  58. function executeLink() 
  59. {
  60.     if (top.frames.length == 0) 
  61.         location.href=this.href
  62.     else
  63.         top.frames[1].location.href = this.href    
  64.  
  65. }
  66. TreeNode.count = 0
  67.  
  68. //-------------------------------------------------------------------
  69. function setBGColor(cColor) 
  70. {
  71.     if (Browser.NS) this.document.bgColor = cColor
  72.     else if (Browser.IE) this.css.backgroundColor = cColor
  73. }
  74.  
  75. //-------------------------------------------------------------------
  76. function TreeView(obj,level,frame) 
  77. {
  78.     if (!Browser.NS5 && !TreeView.done && !frame) initTreeView()
  79.     this.frame = frame || self
  80.     if (Browser.IE) 
  81.     {
  82.         this.element = this.event = this.frame.document.all[obj]
  83.         this.css = this.frame.document.all[obj].style
  84.         this.left = this.element.offsetLeft
  85.         this.top = this.element.offsetTop
  86.         this.width = this.element.offsetWidth
  87.         this.height = this.element.offsetHeight
  88.         this.document = document
  89.     }
  90.     else if (Browser.NS) 
  91.     {
  92.         if (Browser.NS4) 
  93.         {
  94.             if (!frame) 
  95.             {
  96.                 if (!level) var level = TreeView.levelArray[obj]
  97.                 if (!TreeViewTest(obj,level)) return
  98.                 this.css = (level)? eval("document."+level+".document."+obj) : document.layers[obj]
  99.             }
  100.             else this.css = (level)? eval("frame.document."+level+".document."+obj) : frame.document.layers[obj]
  101.             this.element = this.event = this.css
  102.             this.document = this.css.document
  103.         }
  104.         else if (Browser.NS5) 
  105.         {
  106.             this.element = document.getElementById(obj)
  107.             this.css = this.element.style
  108.             this.document = document
  109.         }
  110.         this.left = this.css.left
  111.         this.top = this.css.top
  112.         this.width = this.css.clip.width
  113.         this.height = this.css.clip.height
  114.     }
  115.  
  116.     this.id = obj
  117.     this.level = level
  118.     this.obj = obj + "TreeView"
  119.     eval(this.obj + "=this")
  120. }
  121.  
  122. //-------------------------------------------------------------------
  123. function showAtTreeView(xPos,yPos) 
  124. {
  125.     this.left = xPos
  126.     this.top = yPos
  127.     if (Browser.NS) 
  128.     {
  129.         this.css.left = this.left
  130.         this.css.top = this.top
  131.     }
  132.     else 
  133.     {
  134.         this.css.pixelLeft = this.left
  135.         this.css.pixelTop = this.top
  136.     }
  137. }
  138.  
  139. //-------------------------------------------------------------------
  140. function showTreeView() 
  141. {
  142.     this.css.visibility = (Browser.NS4)? "show" : "visible"
  143. }
  144.  
  145. //-------------------------------------------------------------------
  146. function hideTreeView() 
  147. {
  148.     this.css.visibility = (Browser.NS4)? "hide" : "hidden"
  149. }
  150.  
  151. //-------------------------------------------------------------------
  152. TreeView.prototype.showAt = showAtTreeView
  153. TreeView.prototype.show   = showTreeView
  154. TreeView.prototype.hide   = hideTreeView
  155.  
  156. TreeViewTest = new Function('return true')
  157.  
  158. //-------------------------------------------------------------------
  159. function initTreeView(vLevel) {
  160.  
  161.     if (!TreeView.done) TreeView.done = true
  162.     if (Browser.IE) 
  163.     {
  164.         for (var i=0; i<document.all.tags("DIV").length; i++) 
  165.         {
  166.             var temp = document.all.tags("DIV")[i].id
  167.             var idx = temp.indexOf("Div")
  168.             if (idx > 0) 
  169.             {
  170.                 eval(temp.substr(0,idx)+' = new TreeView("'+temp+'")')
  171.             }
  172.         }
  173.     }
  174.     else if (Browser.NS) 
  175.     {
  176.         if (vLevel) ref = eval('document.'+vLevel+'.document')
  177.         else {vLevel = ''; ref = document;}
  178.         for (var i=0; i<ref.layers.length; i++) 
  179.         {
  180.             var temp = ref.layers[i].name
  181.             TreeView.levelArray[temp] = vLevel
  182.             var idx = temp.indexOf("Div")
  183.             if (idx > 0) 
  184.             {
  185.                 eval(temp.substr(0,idx)+' = new TreeView("'+temp+'","'+vLevel+'")')
  186.             }
  187.             if (ref.layers[i].document.layers.length > 0) 
  188.             {
  189.                 TreeView.refArray[TreeView.refArray.length] = (vLevel=='')? ref.layers[i].name : vLevel+'.document.'+ref.layers[i].name
  190.             }
  191.         }
  192.         if (TreeView.refArray.i < TreeView.refArray.length) 
  193.         {
  194.             initTreeView(TreeView.refArray[TreeView.refArray.i++])
  195.         }
  196.     }
  197.     return true
  198. }
  199.  
  200. //-------------------------------------------------------------------
  201. TreeView.levelArray = new Array()
  202. TreeView.refArray   = new Array()
  203. TreeView.refArray.i = 0
  204. TreeView.done       = false
  205.  
  206. //-------------------------------------------------------------------
  207. function positionTreeView(top,right,bottom,left) 
  208. {
  209.     if (Browser.NS) 
  210.     {
  211.         if (top!=null) this.css.clip.top = top
  212.         if (right!=null) this.css.clip.right = right
  213.         if (bottom!=null) this.css.clip.bottom = bottom
  214.         if (left!=null) this.css.clip.left = left
  215.     } else 
  216.     {
  217.         if ((top!=null) && (right!=null)  && (bottom!=null)  && (left!=null) )
  218.         {
  219.             var coord = this.css.clip.split("rect(")[1].split(")")[0].split("px")
  220.             top = Number(coord[0])
  221.             right = Number(coord[1])
  222.             bottom = Number(coord[2])
  223.             left = Number(coord[3])
  224.             this.css.clip = "rect("+top+"px "+right+"px "+bottom+"px "+left+"px)"
  225.         }
  226.     }
  227. }
  228.  
  229.  
  230. //-------------------------------------------------------------------
  231. function setTreeView(top,right,bottom,left) 
  232. {
  233.     if (Browser.IE) 
  234.     {
  235.        if (arguments.length==4) this.position(top,right,bottom,left)
  236.     }
  237. }
  238.  
  239. //-------------------------------------------------------------------
  240. TreeView.prototype.set      = setTreeView
  241. TreeView.prototype.position = positionTreeView
  242.  
  243. //-------------------------------------------------------------------
  244. function wirteTreeView(sHTML) 
  245. {
  246.     if (Browser.IE) 
  247.     {
  248.         this.event.innerHTML = sHTML
  249.     }
  250.     else if (Browser.NS) 
  251.     {
  252.         this.document.open()
  253.         this.document.write(sHTML)
  254.         this.document.close()
  255.     }
  256. }
  257.  
  258. TreeView.prototype.write = wirteTreeView
  259.  
  260. //-------------------------------------------------------------------
  261. function createCSS(obj,left,top,width,height,color,vis,z,other) 
  262. {
  263.     
  264.     var sCSS = (left!=null && top!=null)? '#'+obj+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+obj+' {position:relative;'
  265.     if (arguments.length>=4 && width!=null) sCSS += ' width:'+width+'px;'
  266.     if (arguments.length>=5 && height!=null) {
  267.         sCSS += ' height:'+height+'px;'
  268.         if (arguments.length<9 || other.indexOf('clip')==-1) sCSS += ' clip:rect(0px '+width+'px '+height+'px 0px);'
  269.     }
  270.     if (arguments.length>=6 && color!=null) sCSS += (Browser.NS)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
  271.     if (arguments.length>=7 && vis!=null) sCSS += ' visibility:'+vis+';'
  272.     if (arguments.length>=8 && z!=null) sCSS += ' z-index:'+z+';'
  273.     if (arguments.length==9 && other!=null) sCSS += ' '+other
  274.     sCSS += '}'
  275.     return sCSS
  276. }
  277.  
  278. //-------------------------------------------------------------------
  279. function writeCSS(sCSS) 
  280. {
  281.     document.write('<STYLE TYPE="text/css">\n'+sCSS+'</STYLE>')
  282. }
  283.  
  284. //-------------------------------------------------------------------
  285. function TreeNode(xPos, yPos, mnuWidth, mnuHeight) 
  286. {
  287.     this.name = "TreeNode"+(TreeNode.count++)
  288.     this.left = xPos
  289.     this.top = yPos
  290.     this.width = mnuWidth
  291.     if (arguments.length==4) 
  292.     {
  293.         this.nodeHeight = mnuHeight
  294.         this.nodeHeightSet = true
  295.         this.height = -1
  296.     }
  297.     else {
  298.         this.nodeHeight = null
  299.         this.nodeHeightSet = false
  300.         this.height = (Browser.NS)? -1 : 1000
  301.     }
  302.  
  303.     this.visibility = 'inherit'
  304.     this.nodeOpen = false
  305.     this.Tree = null
  306.  
  307.     this.Font = 'Arial'
  308.     this.FontSize = 10
  309.     this.color = new Object()
  310.     this.color.ForeGround = '#000000'
  311.     this.color.BackGround = '#FFFFFF'
  312.     this.color.moForeGround = '#FFFFFF'
  313.     this.color.moBackGround = '#0000FF'
  314.     this.color.Border = '#000000'
  315.  
  316.     this.image = new Object()
  317.     this.items = new Array()
  318.     
  319.     this.selectedNode = null
  320.     this.obj = this.name + "TreeNode"
  321.     eval(this.obj + "=this")
  322.  
  323.     this.add = addTreeNode
  324.     this.build = buildTreeNode
  325.     this.activate = activateTreeNode
  326.     this.deselect = deselectTreeNode
  327.     this.onSelect = executeLink
  328.     this.setPointers = imgPointers
  329.  
  330.     this.mouseOver = mouseOver
  331.     this.mouseExit = mouseExit
  332.     this.mouseClick = mouseClick
  333.  
  334. }
  335.  
  336. //-------------------------------------------------------------------
  337. function imgPointers(imgPointerN,imgPointerS,imgWidth,imgHeight) 
  338. {
  339.     this.image.width = imgWidth
  340.     this.image.height = imgHeight
  341.     this.image.PointerN = new Image()
  342.     this.image.PointerN.src = imgPointerN
  343.     this.image.PointerS = new Image()
  344.     this.image.PointerS.src = imgPointerS
  345. }
  346.  
  347. //-------------------------------------------------------------------
  348. function addTreeNode(value) 
  349. {
  350.     var i = this.items.length
  351.     this.items[i] = new Array()
  352.     this.items[i].selected = false
  353.     this.items[i].href = value
  354.     arguments[1]=' '+arguments[1]
  355.     this.items[i].text = arguments[1]
  356.     this.items[i].ForeGround = '<div class="'+this.name+'ForeGround">'+arguments[1]+'</div>'
  357.         this.items[i].moForeGround = '<div class="'+this.name+'moForeGround">'+arguments[1]+'</div>'
  358.     if (this.nodeHeight) 
  359.     {
  360.         this.height += this.nodeHeight+1
  361.         this.items[i].top = i*this.nodeHeight+i*1
  362.     }
  363.     else this.items[i].top = 0
  364. }
  365.  
  366. //-------------------------------------------------------------------
  367. function buildTreeNode() 
  368. {
  369.     this.css = ''
  370.     this.css += createCSS(this.name+'TreeNode',this.left,this.top,this.width,this.height,this.color.Border,(this.nodeHeightSet)?this.visibility:'hidden')
  371.     for (var i=0;i<this.items.length;i++) 
  372.     {
  373.         this.css += createCSS(this.name+'I'+i,0,this.items[i].top,this.width,this.nodeHeight,this.color.BackGround)
  374.         if (this.items[i].hasImage) this.css += createCSS(this.name+'IPointer'+i,this.width-this.image.width,this.items[i].top)
  375.         this.css += createCSS(this.name+'IC'+i,0,this.items[i].top,this.width,this.nodeHeight)
  376.     }
  377.     this.css += '.'+this.name+'ForeGround {font-family:"'+this.Font+'"; font-size:'+this.FontSize+'pt; color:'+this.color.ForeGround+'; background-color:transparent; margin-left:'+1+'px;}\n'+
  378.     '.'+this.name+'moForeGround {font-family:"'+this.Font+'"; font-size:'+this.FontSize+'pt; color:'+this.color.moForeGround+'; background-color:transparent; margin-left:'+1+'px;}\n'
  379.  
  380.     this.div = '<div id="'+this.name+'TreeNode">'
  381.     for (var i=0;i<this.items.length;i++) 
  382.     {
  383.         this.div += '<div id="'+this.name+'I'+i+'">'+this.items[i].ForeGround+'</div>'
  384.         if (this.items[i].hasImage) this.div += '<div id="'+this.name+'IPointer'+i+'"><img name="'+this.name+'IPointer'+i+'" src="'+this.image.PointerN.src+'" width='+this.image.width+' height='+this.image.height+'></div>'
  385.         this.div += '<div id="'+this.name+'IC'+i+'"></div>'
  386.     }
  387.     this.div += '</div>'
  388. }
  389.  
  390. //-------------------------------------------------------------------
  391. function activateTreeNode() 
  392. {
  393.     if (Browser.IE) this.height -= 1001
  394.     this.treeview = new TreeView(this.name+'TreeNode')
  395.     this.treeview.set()
  396.  
  397.     for (var i=0;i<this.items.length;i++) 
  398.     {
  399.         this.items[i].treeview = new TreeView(this.name+'I'+i)
  400.         this.items[i].treeview.setBGColor = setBGColor
  401.         this.items[i].treeview2 = new TreeView(this.name+'IC'+i)
  402.         if (Browser.NS) this.items[i].treeview2.event.captureEvents(Event.MOUSEDOWN)
  403.         this.items[i].treeview2.event.onmouseover = new Function(this.obj+'.mouseOver('+i+'); return false;')
  404.         this.items[i].treeview2.event.onmouseout = new Function(this.obj+'.mouseExit('+i+'); return false;')
  405.         this.items[i].treeview2.event.onmousedown = new Function(this.obj+'.mouseClick('+i+'); return false;')
  406.         if (!this.nodeHeightSet) 
  407.         {
  408.             this.nodeHeight = (Browser.NS)? this.items[0].treeview.document.height : this.items[0].treeview.event.offsetHeight
  409.             this.items[i].treeview.showAt(null,i*this.nodeHeight+1*i)
  410.             this.items[i].treeview2.showAt(null,i*this.nodeHeight+1*i)
  411.             if (Browser.NS) {
  412.                 this.items[i].treeview.set()
  413.                 this.items[i].treeview.position(0,this.width,this.nodeHeight,0)
  414.                 this.items[i].treeview2.set()
  415.                 this.items[i].treeview2.position(0,this.width,this.nodeHeight,0)
  416.             }
  417.             this.height += this.nodeHeight+1
  418.         }
  419.         if (this.items[i].hasImage) 
  420.         {
  421.             this.items[i].imgObject = new TreeView(this.name+'IPointer'+i)
  422.         }
  423.     }
  424.     if (!this.nodeHeightSet) 
  425.     {
  426.         this.treeview.position(0,this.width,this.height,0)
  427.         if (Browser.IE) this.treeview.css.height = this.height
  428.     }
  429.     this.treeview.css.visibility = this.visibility
  430. }
  431.  
  432. //-------------------------------------------------------------------
  433. function deselectTreeNode(iSel) 
  434. {
  435.     if (this.items[iSel]==null) return
  436.     if (this.items[iSel].selected) 
  437.     {
  438.         this.items[iSel].selected = false
  439.         if (this.items[iSel].hasImage) this.items[iSel].imgObject.document.images[this.name+'IPointer'+iSel].src = this.image.PointerN.src
  440.         this.items[iSel].treeview.setBGColor(this.color.BackGround)
  441.         this.items[iSel].treeview.write(this.items[iSel].ForeGround)
  442.     }
  443. }
  444.  
  445. //-------------------------------------------------------------------
  446. function Tree() 
  447. {
  448.  
  449.     this.name = "Tree"+(Tree.count++)
  450.     this.obj = this.name + "TreeObject"
  451.     eval(this.obj + "=this")
  452.     if (arguments.length==4) 
  453.     {
  454.         this.isChild = false
  455.         this.left = arguments[0]
  456.         this.top = arguments[1]
  457.         this.width = arguments[2]
  458.         this.nodeHeight = arguments[3]
  459.         this.subOnSelect = false
  460.         this.topOffset = -1
  461.         this.leftOffset = 0
  462.     }
  463.     else 
  464.     {
  465.         this.isChild = true
  466.         this.parent = arguments[0]
  467.         var index = arguments[1]
  468.         this.parent.node.items[index].hasImage = true
  469.         this.parent.node.items[index].hasChild = true
  470.         this.parent.node.items[index].child = this
  471.         this.left = this.parent.width
  472.         this.top = this.parent.node.items[index].top
  473.         this.width = (arguments.length==3)? arguments[2] : this.parent.width
  474.         this.nodeHeight = this.parent.nodeHeight
  475.         this.childShown = null
  476.         this.subOnSelect = this.parent.subOnSelect
  477.         this.topOffset = this.parent.topOffset
  478.         this.leftOffset = this.parent.leftOffset
  479.     }
  480.  
  481.     this.visibility = 'hidden'
  482.     this.zIndex = null
  483.     this.nodeOpen = false
  484.     
  485.     this.node = new TreeNode(1,1,this.width-2,this.nodeHeight)
  486.     this.node.visibility = 'inherit'
  487.     this.node.Tree = this
  488.     
  489.     if (this.isChild) 
  490.     {
  491.         this.node.image = this.parent.node.image
  492.         this.node.color = this.parent.node.color
  493.         this.node.Font = this.parent.node.Font
  494.         this.node.FontSize = this.parent.node.FontSize
  495.     }
  496.     
  497.     this.nodesChildren = ''
  498.     this.nodeChildren = ''
  499.  
  500.     this.build = buildTree
  501.     this.activate = activateTree
  502.     this.showMenu = showTreeMenu
  503.     this.hideMenu = hideTreeMenu
  504.     this.show = showTree
  505.     this.select = selectTree
  506.     if (this.isChild) this.onSelect = this.parent.onSelect
  507.     else this.onSelect = new Function()
  508. }
  509.  
  510. //-------------------------------------------------------------------
  511. function buildTree(write) 
  512. {
  513.     for (var i=0;i<this.node.items.length;i++) 
  514.     {
  515.         if (this.node.items[i].hasChild) 
  516.         {
  517.             this.node.items[i].child.nodeOpen = this.nodeOpen
  518.             this.node.items[i].child.build()
  519.         }
  520.     }
  521.     this.node.nodeOpen = this.nodeOpen
  522.     this.node.build()
  523.     this.css = createCSS(this.name,this.left+this.topOffset ,this.top+this.leftOffset ,null,null,null,(this.isChild)?'hidden':this.visibility,this.zIndex)+
  524.     createCSS(this.name+'P',0,0,this.width,this.node.height+2,this.node.color.Border)+
  525.     this.node.css+
  526.     this.nodesChildren
  527.  
  528.     this.div = '<div id="'+this.name+'">'+
  529.     '<div id="'+this.name+'P">'+this.node.div+'</div>'+this.nodeChildren+'</div>\n'
  530.  
  531.     if (this.isChild) 
  532.     {
  533.         this.parent.nodesChildren += this.css
  534.         this.parent.nodeChildren += this.div
  535.     }
  536. }
  537.  
  538. //-------------------------------------------------------------------
  539. function activateTree() 
  540. {
  541.     this.node.activate()
  542.     this.treeview = new TreeView(this.name)
  543.     this.height = this.node.height+2
  544.     if (Browser.NS && !this.isChild) 
  545.     {
  546.         this.treeview.set()
  547.         this.treeview.position(0,this.width,this.height,0)
  548.     }
  549.     this.node.onSelect = new Function(this.obj+'.select(); return false;')
  550.     for (var idx=0;idx<this.node.items.length;idx++) 
  551.     {
  552.         if (this.node.items[idx].hasChild) this.node.items[idx].child.activate()
  553.     }
  554. }
  555.  
  556. //-------------------------------------------------------------------
  557. function selectTree() 
  558. {
  559.     var idx = this.node.selectedNode
  560.     if (idx!=null) 
  561.     {
  562.         if (this.childShown==idx) 
  563.         {
  564.             this.hideMenu(this.childShown)
  565.         }
  566.         else 
  567.         {
  568.             this.hideMenu()
  569.             if (this.node.items[idx].hasChild) this.showMenu(idx)
  570.             if (!this.node.items[idx].hasChild || this.subOnSelect) this.onSelect()
  571.         }
  572.     }
  573. }
  574.  
  575. //-------------------------------------------------------------------
  576. function hideTreeMenu() 
  577. {
  578.     var idx = this.childShown
  579.     if (idx!=null && this.node.items[idx]!=null) 
  580.     {
  581.         this.childShown = null
  582.         this.node.items[idx].child.treeview.hide()
  583.         this.node.items[idx].child.hideMenu()
  584.         if (this.node.items[idx].child.node.selectedNode!=null) 
  585.         {
  586.             this.node.items[idx].child.node.deselect(this.node.items[idx].child.node.selectedNode)
  587.         }
  588.         if (Browser.NS && !this.isChild) this.treeview.position(0,this.width,this.height,0)
  589.     }
  590. }
  591.  
  592. //-------------------------------------------------------------------
  593. function showTreeMenu(iSel) 
  594. {
  595.     if (Browser.NS && !this.isChild) this.treeview.position(0,this.treeview.width,this.treeview.height,0)
  596.     this.node.items[iSel].child.treeview.show()
  597.     this.childShown = iSel
  598. }
  599.  
  600. //-------------------------------------------------------------------
  601. function showTree(fshow) 
  602. {
  603.     if (fshow) 
  604.     {
  605.         this.treeview.css.visibility = 'inherit'
  606.         this.visible = true
  607.     } else
  608.     {
  609.         this.hideMenu()
  610.         this.node.deselect(this.node.selectedNode)
  611.         this.treeview.hide()
  612.         this.visible = false
  613.     }
  614. }
  615.  
  616. Tree.count = 0
  617.  
  618.